package com.power.sifa.config;

import feign.Logger;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;

public class FeignFlowableInterceptor implements RequestInterceptor {

    @Value("${feign.client.flowable-feignurl:#{null}}")
    private String url;

    @Bean
    Logger.Level feignLoggerLevel() {
        //这里记录所有，根据实际情况选择合适的日志level
        return Logger.Level.BASIC;
    }

    @Override
    public void apply(RequestTemplate requestTemplate) {
        requestTemplate.target(url);
    }
}
